package SuperMarketGuis;

import java.sql.*;
import java.util.Vector;
import javax.swing.table.DefaultTableModel;


public class ProductManagement extends javax.swing.JDialog {
    
    private static Connection conn = null;
    private static Statement stmt = null;
    private static String dbURL = 
	"jdbc:derby://localhost:1527/SuperMarket;create=true;user=plh24;password=plh24";
    
    
    private int ValidFieldsCheck(String productname, String productcode, 
            String productprice,String productpointsworth)
    {
            int valid=1;
            if ((!productprice.trim().equalsIgnoreCase(""))&&(!productpointsworth.trim().equalsIgnoreCase(""))
                    &&(!productname.trim().equalsIgnoreCase(""))&&(!productcode.trim().equalsIgnoreCase("")))
            {
                try
                {
                    int ppointsworth = Integer.parseInt(productpointsworth.trim());
                    float pprice = Float.valueOf(productprice.trim());
                    valid = 0;
                }
                catch(NumberFormatException ex)
                {
                    MessageArea.setText("Πρέπει να δώσετε έγγυρα δεδομένα τιμής και αξίας πόντων");
                    valid = 1;
                }
            }
            else 
            {
                MessageArea.setText("Πρέπει να συμπληρώσετε ΟΛΑ τα πεδία.");
                valid = 1;
            }
            
            return (valid);
    }
    
    
    
    private void AddProduct(String productname, String productcode, 
            float productprice, int productpointsworth)
    {
                try
                    {
                    Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
                    //Get a connection
                    conn = DriverManager.getConnection(dbURL); 
                    stmt = conn.createStatement();
                    String query = ("SELECT * FROM product where name like '"
                    +productname+"' and code like '"+productcode+"'");
                    ResultSet rst1 = stmt.executeQuery(query);
                    if (rst1.next()) 
                        {
                        MessageArea.setText("Το προϊόν "+productname+" και κωδικό "
                                +productcode+" υπάρχει ήδη.");
                        }
                    else
                        {
                        query = ("INSERT INTO product (name,points,price,code) VALUES ('"
                                +productname+"',"+productpointsworth+","+productprice+",'"
                                +productcode+"')");
                        int i = stmt.executeUpdate(query);
                        MessageArea.setText("Το προϊόν "+productname+" και κωδικό "
                                +productcode+" καταχωρήθηκε επιτυχώς.");
                        }
                    // Disconnect from database
                    stmt.close();
                    conn.close();
                    
                    
                    }
                catch (Exception ex)
                    {
                    MessageArea.setText(ex.getMessage());
                    }
                
    }
    
    private void EditProduct(int productid, String productname, 
            String productcode, float productprice, int productpointsworth)
    {
                    try
                    {   
                        Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
                        conn = DriverManager.getConnection(dbURL);
                        stmt = conn.createStatement();
                        String sqlquery1 = ("Select * from plh24.product where name like '"
                                +productname+"' and code like '"+productcode+"' and price ="
                                +productprice+" and points ="+productpointsworth);
                        ResultSet res1 = stmt.executeQuery(sqlquery1);
                        if (res1.next())
                            {
                                MessageArea.setText("Το προϊόν "+productname+" με κωδικό "
                                        +productcode+" υπάρχει ήδη.");
                            }
                        else
                            {
                                String sqlquery2 = ("Update plh24.product set name = '"
                                        +productname+"',code = '"+productcode+"',price = "
                                        +productprice+",points = "+productpointsworth+" where product_id ="+productid);
                                int rowaffected = stmt.executeUpdate(sqlquery2);
                            }
                        stmt.close();
                        conn.close();
                  
                    }
                    catch(Exception ex)
                        {
                            System.out.println(ex.getMessage());
                        }
                
    }
    
    private void DeleteProduct(int productid)
        {
                    try
                    {   
                        Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
                        conn = DriverManager.getConnection(dbURL);
                        stmt = conn.createStatement();
                        String sqlquery = ("Delete from plh24.product where product_id = "+productid);
                        int rowaffected = stmt.executeUpdate(sqlquery);
                        stmt.close();
                        conn.close();
                    }
                    catch(Exception ex)
                        {
                            System.out.println(ex.getMessage());
                        }
        }
    
    private void initTable()
    {
        try
        {   
            conn = DriverManager.getConnection(dbURL);
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery("Select product_id,name,code,price,points from plh24.product order by name");
            ResultSetMetaData rsmt = rs.getMetaData();
            int column = rsmt.getColumnCount();
            
            DefaultTableModel dtm = new DefaultTableModel();
            Vector clabel = new Vector();
            Vector data_row = new Vector();
            for (int i=1;i<=column;i++)
            {
                clabel.addElement(rsmt.getColumnName(i));
                dtm.setColumnIdentifiers(clabel);}
            while (rs.next())
                    {
                    data_row = new Vector();
                    for (int j=1;j<=column;j++)
                        {
                            data_row.addElement(rs.getString(j));
                        }
                    dtm.addRow(data_row);
                    ProductList.setModel(dtm);
                    }
            stmt.close();
            conn.close();
        }
        catch(Exception ex){System.out.println(ex.getMessage());}
        
    }
    public ProductManagement(java.awt.Frame parent, boolean modal) 
    {
        super(parent, modal);
        initComponents();
        initTable();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        ProductName = new javax.swing.JTextField();
        ProductCode = new javax.swing.JTextField();
        bAddProduct = new javax.swing.JButton();
        bProductUpdate = new javax.swing.JButton();
        bProductDelete = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        ProductPrice = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        ProductPointsWorth = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        MessageArea = new javax.swing.JTextArea();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        ProductList = new javax.swing.JTable();
        bReturn = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setAlwaysOnTop(true);

        jLabel1.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Διαχείρηση Προϊόντων");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabel2.setText("Όνομα Προϊόντος:");

        jLabel3.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabel3.setText("Κωδικός Προϊόντος:");

        ProductName.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N

        ProductCode.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N

        bAddProduct.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        bAddProduct.setText("Προσθήκη");
        bAddProduct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bAddProductActionPerformed(evt);
            }
        });

        bProductUpdate.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        bProductUpdate.setText("Τροποποίηση");
        bProductUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bProductUpdateActionPerformed(evt);
            }
        });

        bProductDelete.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        bProductDelete.setText("Διαγραφή");
        bProductDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bProductDeleteActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabel4.setText("Τιμή Προϊόντος:");

        ProductPrice.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N

        jLabel5.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabel5.setText("Αξία σε πόντους:");

        ProductPointsWorth.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(34, 34, 34)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ProductName, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
                            .addComponent(ProductCode))
                        .addGap(62, 62, 62)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(44, 44, 44)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(ProductPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE)
                            .addComponent(ProductPointsWorth)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(bAddProduct)
                        .addGap(169, 169, 169)
                        .addComponent(bProductUpdate)
                        .addGap(174, 174, 174)
                        .addComponent(bProductDelete)))
                .addContainerGap(129, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ProductName, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)
                        .addComponent(ProductPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ProductCode, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                        .addComponent(jLabel5)
                        .addComponent(ProductPointsWorth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bAddProduct)
                    .addComponent(bProductUpdate)
                    .addComponent(bProductDelete))
                .addContainerGap())
        );

        MessageArea.setEditable(false);
        MessageArea.setColumns(1);
        MessageArea.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
        MessageArea.setForeground(new java.awt.Color(204, 0, 0));
        MessageArea.setLineWrap(true);
        MessageArea.setRows(5);
        MessageArea.setText("1)    Για να προσθέσετε ένα προϊόν, καταχωρήστε το όνομα και τη διεύθυνση στα αντίστοιχα πεδία και πατήστε το κουμπί \n        \"Προσθήκη\".\n2)    Για να τροποποιήσετε ένα υπάρχον προϊόν, επιλέξτε το από τον πίνακα, δώστε τα νέα στοιχεία στα αντίστοιχα πεδία και \n        πατήστε το κουμπί \"Τροποποίηση\".\n3)    Για να διαγράψετε ένα υπάρχον προϊόν, επιλέξτε το από τον πίνακα και πατήστε το κουμπί \"Διαγραφή\".\n4)    Για να επιστρέψετε στο προηγούμενο μενού πατήστε το κουμπί \"Επιστροφή\".\n");
        MessageArea.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(0, 255, 255), null));
        MessageArea.setSelectedTextColor(new java.awt.Color(204, 0, 0));
        jScrollPane2.setViewportView(MessageArea);

        ProductList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "PRODUCT_ID", "NAME", "CODE", "PRICE", "POINTS"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(ProductList);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        bReturn.setFont(new java.awt.Font("Calibri", 0, 14)); // NOI18N
        bReturn.setText("Επιστροφή");
        bReturn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bReturnActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane2)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(479, 479, 479)
                .addComponent(bReturn)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(bReturn)
                .addGap(17, 17, 17))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void bAddProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bAddProductActionPerformed
            
        if (ValidFieldsCheck(ProductName.getText(),ProductCode.getText(),ProductPrice.getText(),ProductPointsWorth.getText())==0)
        {
            AddProduct(ProductName.getText(), ProductCode.getText(), 
                    Float.valueOf(ProductPrice.getText().trim()), 
                    Integer.parseInt(ProductPointsWorth.getText().trim()));
            initTable();
        }
    }//GEN-LAST:event_bAddProductActionPerformed

    private void bProductUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bProductUpdateActionPerformed
            
            if (ValidFieldsCheck(ProductName.getText(),ProductCode.getText(),ProductPrice.getText(),ProductPointsWorth.getText())==0)
            {
                int k=-1;
                k = ProductList.getSelectedRow();
                if (k==-1)
                    {
                        MessageArea.setText("Πρέπει να επιλέξετε ένα κατάστημα από τη λίστα.");
                    }
                    else
                    {   
                        EditProduct(Integer.parseInt(ProductList.getValueAt(k, 0).toString()), 
                        ProductName.getText(), ProductCode.getText(), 
                        Float.valueOf(ProductPrice.getText().trim()), 
                        Integer.parseInt(ProductPointsWorth.getText().trim()));
                        initTable();
                    }
            }
            
    }//GEN-LAST:event_bProductUpdateActionPerformed

    private void bReturnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bReturnActionPerformed
            //this.dispose();
            System.exit(0);
    }//GEN-LAST:event_bReturnActionPerformed

    private void bProductDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bProductDeleteActionPerformed
            int k,productid;
            k=-1;
            k = ProductList.getSelectedRow();
            if (k==-1)
            {
                MessageArea.setText("Πρέπει να επιλέξετε ένα κατάστημα από τη λίστα.");
            }
            else
            {
                productid = Integer.parseInt(ProductList.getValueAt(k, 0).toString());
                DeleteProduct(productid);
                this.dispose();
            }
    }//GEN-LAST:event_bProductDeleteActionPerformed

    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ProductManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ProductManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ProductManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ProductManagement.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                ProductManagement dialog = new ProductManagement(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea MessageArea;
    private javax.swing.JTextField ProductCode;
    private javax.swing.JTable ProductList;
    private javax.swing.JTextField ProductName;
    private javax.swing.JTextField ProductPointsWorth;
    private javax.swing.JTextField ProductPrice;
    private javax.swing.JButton bAddProduct;
    private javax.swing.JButton bProductDelete;
    private javax.swing.JButton bProductUpdate;
    private javax.swing.JButton bReturn;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    // End of variables declaration//GEN-END:variables
}